-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue-3658] Allow customizing fee for substrate/evm transactions #3989
base: subwallet-dev
Are you sure you want to change the base?
Conversation
[Issue-3745] - Update message in case perform Liquid staking have XCM
8a4c4c7
to
fb04a8b
Compare
0172bb8
to
fccd2b1
Compare
|
||
const freeBalanceSubject = new Subject<AmountData>(); | ||
const feeSubject = new Subject<FeeInfo>(); | ||
const feeChainType: FeeChainType = isXcmTransfer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out-date
? 'evm' | ||
: 'substrate'; | ||
|
||
const convertData = async (freeBalance: AmountData, fee: FeeInfo): Promise<ResponseSubscribeTransfer> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a util function.
let maxTransferable = new BigN(freeBalance.value); | ||
|
||
try { | ||
if (isXcmTransfer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split into multi function to clear logic
@@ -3859,10 +4137,17 @@ export default class KoniExtension { | |||
const evmApi = this.#koniState.getEvmApi(chain); | |||
const metadata = notification.metadata as ClaimPolygonBridgeNotificationMetadata; | |||
|
|||
const getChainFee: GetFeeFunction = (id, chain, type) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use it directly?
426ecb4
to
fe58b5a
Compare
04f64bc
to
a4680ac
Compare
Related issue: #3658